<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!-- saved from url=(0087)http://www.9918677.cn/pdk/daili_mobile/chargegoldtoplayer.php?agid=544677&type=4&usid=1 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>商户管理系统</title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MobileOptimized" content="240">

<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="/agent_admin/Public/home/css/public.css" media="all">
<link rel="stylesheet" type="text/css" href="/agent_admin/Public/home/css/style.css" media="all">
<script src="/agent_admin/Public/home/js/jquery-2.1.0.min.js.下载"></script>
</head>

<body class="body" style="padding-top:0px;">
	<div class="page_top">
    	<a href="indexx.html" class="back"><img src="/agent_admin/Public/home/images/ico_back.png"></a>
        <div class="pg_name" onclick="location.reload()"><?php  if($_POST['game']==1){echo '温州麻将玩家冲钻';}else{echo '玩家充钻';}?></div>
    </div>
<?php  foreach ($sql as $v) ?>
	<div class="pl_info">
	<img src="<?php echo $v['headimg'] ?>">
	<label>玩家昵称：<input style='overflow:auto; background-attachment: fixed; background-repeat: no-repeat; border-style: solid; 
border-color: #ececec;background:#ececec;width:20%;' name="userid" type=""  disabled="true" value="<?php echo $v['name'] ?>"><br>
			<label>玩家ID：</label><input style='overflow:auto; background-attachment: fixed; background-repeat: no-repeat; border-style: solid; 
border-color: #ececec;background:#ececec;width:20%;' name="userid" type=""  disabled="true" value="<?php echo $v['userid'] ?>"><br>
			<label>当前钻数：</label><input  style='overflow:auto; background-attachment: fixed; background-repeat: no-repeat; border-style: solid; 
border-color: #ececec;background:#ececec;width:20%;' name="gems" type=""  disabled="true" value="<?php echo $v['gems'] ?>"><br>
    </div>
<form id="myform" name="form1" method="post" action="<?php echo U('Index/money_settle') ?>">
<div class="player_search" style="margin-bottom:5%">
    	<label class="lb" style="width:88px;">充值游戏：</label>
        <span id="paodekuai" style="margin-left:10%" data-id="1" data-rx="1" data-ry="1" class="game c">温州麻将</span>
		<!-- <span id="paodekuai" data-id="2" data-rx="1" data-ry="1" class="game">跑得快</span> -->
		<!-- <span id="paodekuai" data-id="3" data-rx="1" data-ry="2" class="game">斗地主</span>         -->

        <input id="game" name="game" type="hidden" value="1">
        <!-- <input id="ratex" name="ratex" type="hidden" value="2"> -->
        <!-- <input id="ratey" name="ratey" type="hidden" value="3"> -->
    </div>
    <div class="put_box">

			<div class="put" style="display:none;">
				<label class="lb">玩家昵称</label>
				<input id="nick" name="name" type="text" readonly="" value="<?php echo $v['name'] ?>" class="txt">
			</div>
			<div class="put" style="display:none;">
				<label class="lb">玩家ID：</label>
				<input id="nick" name="userid" type="text" readonly="" value="<?php echo $v['userid'] ?>" class="txt">
			</div>

			<div class="put" style="display:none;">
				<label class="lb">当前钻数：</label>
				<input id="card" name="gems" type="text" readonly="" value="<?php echo $v['gems'] ?>" class="txt">
			</div>
				<div class="put">
				<label class="lb">充钻数量：</label>
				<span id="minus" class="mp">-</span><input id="gold" name="gems2" type="number" value="0" class="txt txt1"><span id="plus" class="mp">+</span>
				
			</div>

			<div class="btn">
				<input type="submit" value="充值" class="btn">
			</div>
			</div>
		</form>
    
	<div class="pg_foot_box">
	<center>
		<div class="pg_foot">
			<a href="indexx.html">商户管理平台</a>
		</div>
    </center>
	</div>
    <div id="popbg" class="pop_box_bg"></div>
    <div id="ophint" class="op_hint">正在充钻，请稍候...</div>
    
     <div id="hintbox" class="hint_box">
        <span id="hintmsg"></span>
    </div>   
    <script type="text/javascript">
		<!-- function checkForm(){ -->
			<!-- if($("#gold").val() == 0 || $("#gold").val() == ""){ -->
				<!-- hintPop("请输入钻石的数量！"); return false; -->
			<!-- } -->
			<!-- goChargeGold(); -->
		<!-- } -->
		
		<!-- function goChargeGold(){ -->
			<!-- $("#popbg").css({"height":$(window).height() + "px", "display": "block"}); -->
			<!-- $("#ophint").css("display", "block"); -->
	
			<!-- $.post("prog.php?ac=charge&do=save", -->
				<!-- { -->
					<!-- cmd:"pdkgold", -->
					<!-- timestamp:"1482988923", -->
					<!-- sign:"8bc5f374fd381b7324ef033bf58a0ffa", -->
					<!-- agentid:"544677", -->
					<!-- agtype:"4", -->
					<!-- nick:$("#nick").val(), -->
					<!-- usid:$("#usid").val(), -->
					<!-- gold:$("#gold").val() -->
				<!-- }, -->
				<!-- function(data, status){ -->
					<!-- if(status == "success"){ -->
						<!-- v = $.parseJSON(data); -->
						<!-- if(v.result == 0){							 -->
							<!-- hintPop(v.errorMsg); -->
							<!-- $("#ophint").css("display", "none"); -->
							<!-- $("#popbg").css("display", "none"); -->
						<!-- }else{ -->
							<!-- $("#card").val(Number($("#card").val()) + Number($("#gold").val())); -->
							<!-- $("#plcard").html($("#card").val()); -->
							<!-- $("#gold").val(10); -->
							<!-- $("#ophint").html("充钻成功！"); -->
							
							<!-- setTimeout(function(){ -->
								<!-- $("#ophint").css("display", "none"); -->
								<!-- $("#popbg").css("display", "none"); -->
								<!-- window.location.href="http://web.hand999.com/daili_mobile/searchplayer.php"; -->
							<!-- }, 3000); -->
				
							<!-- //hintPop(v.errorMsg); -->
														<!-- //window.location.href="searchplayer.php"; -->
														<!-- //window.location.href="searchplayer.php?usid=0"; -->
													<!-- } -->
						<!-- //$("#ophint").css("display", "none"); -->
						<!-- //$("#popbg").css("display", "none"); -->
						<!-- return false; -->
					<!-- } -->
				<!-- } -->
			<!-- ); -->
		<!-- } -->
		
		$("#minus").click(function(){
			var gold = Number($("#gold").val());
			if(gold > 1){
				gold = gold - 1;
				$("#gold").val(gold);
			}
		});
		$("#plus").click(function(){
			var gold = Number($("#gold").val());

			gold = gold + 1;
			$("#gold").val(gold);
		});
		
		$("#popbg").click(function(){
			$("#ophint").css("display", "none");
			$("#popbg").css("display", "none");
		});
		
		function onlyNumber(event){
			var keyCode = event.keyCode;			
			if(keyCode<48 || keyCode>57){
				return false;			
			}
		}
		$(function(){
			$("#gold").keypress(onlyNumber);
		});
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
	</script>

</body></html>